#ifndef SCORE_BOARD_H
#define SCORE_BOARD_H

#include <QWidget>
#include <QString>


namespace Ui {
class score_board;
}

class score_board : public QWidget
{
    Q_OBJECT

public:
    explicit score_board(QWidget *parent = nullptr);
    ~score_board();

    // Getter and Setter for uname_
    QString uname() const { return uname_; }
    void setUname(const QString &uname) { uname_ = uname; }

    // Getter and Setter for score_
    int score() const { return score_; }
    void setScore(int score) { score_ = score; }

    // Getter and Setter for opened_bombs_num_
    int openedBombsNum() const { return opened_bombs_num_; }
    void setOpenedBombsNum(int num) { opened_bombs_num_ = num; }

    // Getter and Setter for opened_not_bombs_num_
    int openedNotBombsNum() const { return opened_not_bombs_num_; }
    void setOpenedNotBombsNum(int num) { opened_not_bombs_num_ = num; }

signals:
    /* 根据现有数据刷新计分板 */
    void refresh();

private:
    QString uname_;
    int score_;
    int opened_bombs_num_;
    int opened_not_bombs_num_;
    Ui::score_board *ui;
};

#endif // SCORE_BOARD_H
